package com.suyuan.service;

import com.suyuan.entity.CustomAddr;
import com.suyuan.entity.CustomInfo;
import com.suyuan.params.RegistParam;

import java.util.List;

/**
 * Created by yang on 2018/4/1.
 */
public interface CustomerService {

    /**
     * 我的地址
     * @return
     */
    List<CustomAddr> findAddrById(Integer id);

    /**
     * 添加新的收货地址
     * @return
     */
    boolean newAddr(CustomAddr addr);

    /**
     * 根据id查找用户
     */
    CustomInfo findById(Integer id);

    /**
     * 根据用户名查找用户对象
     */
    CustomInfo findByUsername(String username);

    /**
     * 注册用户
     * @param param
     */
    void registCustomer(RegistParam param)throws Exception;


    boolean updateAddr(CustomAddr addr);

    boolean deleteAddr(Integer id);

    //商城后台查找所有用户
    List<CustomInfo> findAllCustomer();

    //删除客户
    void deleteCustomer(Integer id);

    void editCustomer(CustomInfo customeInfo);
}
